The count command has one simple role, to count observations in general or that satisfy some condition(s). This task can be useful when some larger problem pivots on counting, especially if count is used with a loop over observations or variables. I use various problems, mostly of data management, as examples. I also make comparisons with the use of _N, summarize, and egen for the same or similar problems.
CoxN. J.2001. dm89: Dropping variables or observations with missing values. Stata Technical Bulletin60: 7–8. Reprinted in Stata Technical Bulletin Reprints, vol. 10, pp. 44–46. College Station, TX: Stata Press.
2.
CoxN. J.2002a. Speaking Stata: How to face lists with fortitude. Stata Journal2: 202–222.
3.
CoxN. J.2002b. Speaking Stata: How to move step by: step. Stata Journal2: 86–102.
4.
CoxN. J.2002c. Speaking Stata: On getting functions to do the work. Stata Journal2: 411–427.
5.
CoxN. J.2003. Speaking Stata: Problems with lists. Stata Journal3: 185–202.
6.
CoxN. J.2006. Stata tip 39: In a list or out? In a range or out?Stata Journal6: 593–595.