count occurences of a value in an array python code example Example: count occurrences of value in array python >>> l = ["a","b","b"] >>> l.count("a")