Datadog interview question

Write a python function that count frequency bucket