Number guess game program in python 3
Your comments describe what the code is doing, not why the code's doing what it is. And so are generally unhelpful.
Please don't use profanity in comments, or anywhere. It makes you look unprofessional, and is not really that helpful.
To hell with sys.setrecursionlimit. It just delays the inevitable, rather than fixes your problem.
Rather than using global variables, you could instead use a closure.
Your recursion should be in a separate function. That only gets user input. But it'd be better if it were a while loop.

For example you could use:

def get_user_input(fn, prompt='', exception_message=''):
    while True:
        try:
            return fn(input(prompt))
        except ValueError:
            print(exception_message)

Don't repeat yourself. You write get_user_input out twice. In different ways.
The while loop for your higher or lower game seems pretty good. Nice job on that.


And so ignoring your error part I'd use:

import random


def get_user_input(fn, prompt='', exception_message=''):
    while True:
        try:
            return fn(input(prompt))
        except ValueError:
            print(exception_message)


def main():
    limit = get_user_input(int, prompt='Input the Maximum number: \t',
                           exception_message='Input whole numbers only.')


    print('I am thinking of a whole number between 1 and {limit} (both inclusive).'.format(limit=limit))
    number = random.randint(1, limit)
    count = 0
    while True:
        print("Guess the number.")
        guess = get_user_input(int, exception_message='Input whole numbers only.')
        count += 1
        if guess == number:
            break

        if guess &gt; number:
            print('Too high!\nTry a little lower.')
        else guess &lt; number:
            print('Too low!\nTry a little higher.')

    print('Congratulations!!!\nYou guessed the number after {count} tries.'.format(count=count))

if __name__ == '__main__':
    main()


If errors is super important to you, you could return the amount of errors from get_user_input and add it to a local errors variable.
Say:

errors = 0
while True:
    limit, input_errors = get_user_input(...)
    errors += input_errors