<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def providers_count(df):
 """ Returns total occurrences of each provider in the database. """

    providers_count = {}
    cnpj_array = df.values

    for a in cnpj_array:
        cnpj = a[0]
        occurrences = providers_count.get(cnpj, 0)
        providers_count[cnpj] = occurrences + 1

    return pd.DataFrame.from_dict(providers_count, orient='index')