import math


def chunks_number(start, end, period, chunksize):
    """
    Return number of chunks for a given period
    """
    try:
        return(int(math.ceil((end-start).total_seconds()/(period.total_seconds()*chunksize))))
    except:
        return(1)