⇐ Index
GetUnitCount(<-unitType) ->unitCount
Returns a count of the number of units of the specified type. See Unit Types for a list of strings. The count includes both built and unbuilt units.
Take note: This only works for player buildable units such as cannons, towers or airships. It does not work for anything else (eggs, totems, ultraC, emitters, etc.). For other things you'd need to use GetUnitsByType and use GetListCount on it.
Print(GetUnitCount("sniper"))
⇐ Index