Something like this should be faster, since it avoids the use of function calls:
text = """\
A list of Pythonyms ...
pythonanism: spending way too much time programming Python
pythoncology: the science of debugging Python programs
pythondemic: something bad that lots of Pyton programmers do
pythonerous: something hard to do in Python
pythong: a short piece of Python code that works
pythonorean: someone who knows the esoteric technical aspects of Python
pythonus: something you don't want to do in Python
pythonym: one of these words
ptyhoon: someone who is really bad at Python
sython: to use someone else's Python code
pythug: someone who uses python to crash computers
Pythingy: a function or tool that works, but that you don't understand
Pythonian: somebody that insists on using a very early version of python
PythUH? - block of code that yields a very unexpected output
Pythealot: a Python fanatic
"""
spaces = 0
for c in text:
# add to the count of spaces
if c == " ":
spaces += 1
print( "This text has %d spaces" % spaces )