The following example returns the number of themes and folders in the active web.
Private Sub GetWebCount()
Dim myWeb As Web
Dim myCount As Integer
Set myWeb = ActiveWeb
With myWeb
myThemeCount = .Themes.Count
myFolderCount = .RootFolder.Folders.Count
End With
End Sub