def _count_nibbles(long_value_hexadecial):
    """
    Calculates the number of nibbles (4 bit group) from the given
    long value encoded in hexadecimal string.

    :type long_value_hexadecial: String
    :param long_value_hexadecial: The long value encoded in
    hexadecimal string to count the nibbles.
    :rtype: int
    :return: The number of nibbles in the given value.
    """
    number_junk_characters = 2 + long_value_hexadecial.endswith('L')
    number_nibbles = len(long_value_hexadecial) - number_junk_characters
    return number_nibbles
