EDIT: Or well — look at the way described by @Tyler Ferraro.
The question is how do you define a line in your language? A line must end with a period. So technically a line can only contain 0 or 1 periods depending on who you ask.
If it's contained in ''
like: '.'
or ""
like ".", then it's a different case and you could use regex.
I am assuming your line is like: A.BAN.DON
for line in indict:
# if line has my_count num of '.':
for character in line:
if character is ".":
dotCount += 1
print "line: %s has %d periods" % (line, dotCount)
And you can arrange the rest of the stuff yourself (like declaring dotCount, etc...)