Python script to count the number of jokes in a file of a specific format