input: Write a python function to count the frequency of words in a given sentence and plot a histogram using matplotlib.
  assert count_and_plot_frequency("This is a sentence with a lot of different words.") == {'This': 1, 'is': 1, 'a': 1, 'sentence': 1, 'with': 1, 'lot': 1, 'of': 1, 'different': 1, 'words': 1}
  assert count_and_plot_frequency("Hello world! Hello!") == {'Hello': 2, 'world': 1}
  assert count_and_plot_frequency("Python is great. Python is fun.") == {'Python': 2, 'is': 2, 'great': 1, 'fun': 1}
output: def count_and_plot_frequency(sentence):
      from collections import Counter
      import matplotlib.pyplot as plt
      import re
      
      # Remove punctuation and convert to lowercase
      words = re.findall(r'\b\w+\b', sentence)
      
      # Count the frequency of each word
      frequency = Counter(words)
      
      # Plotting the histogram
      plt.bar(frequency.keys(), frequency.values())
      plt.xlabel('Words')
      plt.ylabel('Frequency')
      plt.title('Word Frequency Histogram')
      plt.xticks(rotation=45)
      plt.show()
      
      return dict(frequency)