def get_element_counts(basis):
    """
    Returns chemical elements with their count wrt their original order in the basis.
    Note: entries for the same element separated by another element are considered separately.
    [{"count":1, "value":"Zr"}, {"count":23, "value":"H"}, {"count":11, "value":"Zr"}, {"count":1, "value":"H"}]
    """
    element_counts = []
    previous_element = None
    for index, element in enumerate(basis['elements']):
        if previous_element and previous_element['value'] == element['value']:
            element_counts[-1]['count'] += 1
        else:
            element_counts.append({'count': 1, 'value': element['value']})
        previous_element = basis['elements'][index]
    return element_counts
