title: Pandas counting rows with dates
body: <p>I have a DataFrame like this:</p>
  
  <pre><code>      Date         X       Y
  0  2002-01-01     ...     ...
  1  2002-01-01     ...     ...
  2  2002-01-03     ...     ...
  3  2002-01-04     ...     ...
  4  2002-01-04     ...     ...
  5  2002-01-04     ...     ...
  </code></pre>
  
  <p>My goal is to get an additional column that count rows with the same dates and also drops duplicates:</p>
  
  <pre><code>      Date         X       Y      Count
  0  2002-01-01     ...     ...       2
  1  2002-01-03     ...     ...       1
  2  2002-01-04     ...     ...       3
  </code></pre>
  
  <p>I've read a few posts and tried <code>.unique</code>, <code>.size()</code>, <code>.transform()</code>, <code>.value_counts()</code>, but none of them helped me through. Even simple <code>.drop_duplicates(subset='Date')</code> doesn't work. </p>
  
  <p>Edit: the <code>Date</code> column was created with <code>.dt.date</code>.</p>