Cisco Interview Question

Given an array of strings, create a function that returns the number of matching prefixes