Counts number of functions in socode.py