title: Finding number of runs of a number in a list in python
body: <p>How can I count the number of occurrences of a number in a list. For example: List = [1, 2, 2, 1, 5, 1, 1, 7, 7, 7, 7, 7, 1, 1, 3, 3, 3]. 
  How do I count the total number of runs of consecutive numbers. Also, be able to figure out which number has the longest amount of runs and how long it is. I know I can use the count function but it becomes difficult when writing a function to make this work for any inputted list due to figuring out which number it is. Here is the code I have so far(doesn't work, just an idea):<a href="https://i.stack.imgur.com/AyeCD.png" rel="nofollow noreferrer">code</a></p>