Style, count instances, compilable

Changed style to pythonic (mostly snake case. /sigh/). Implemented
function to count instances in a file. Added returns so it can be
compiled.