The count is an ArcGIS Pro feature that does not exist in ArcMap. I could suggest adding a field, classifying it, and counting using Summarize.. or the Summary Statistics tool, but adapting your python script to run in ArcMap would probably be easier.