def timestamp_to_microseconds(ts):
    """Converts a datetime object to the number of microseconds since epoch.

    Args:
        ts (datetime.datetime): The datetime object.
    
    Returns:
        int: The number of microseconds from epoch.
    """
    microsecond_amount = 1000000  # 1 second worth of microseconds
    return ts.timestamp() * microsecond_amount