Regular expressions in functions

Write a function called 'agecount' that returns the number of
homicide victims of a given age. For most (but not all) records there is an indication of the age of the victim. Your function should take one argument, the age of the victim(s), extract
the age of the victim from each record and then return a count of the number of victims of the specified age.
• The argument passed to 'agecount' should be a positive integer, but you do not need to check for this.
• If a record does not contain any age information, the record should be ignored.
• The function should return an integer indicating the number of victims of a given age.
• Your function should read the homicides dataset in the manner indicated above.