title: DataFrames.jl : count rows by group while defining count column name
body: <p>I am trying to count the number of rows by group in a DataFrame. The following code generates a new column, called x1, which which has the intended information:</p>
  <pre><code>by(df, [:grouping_var_1, :grouping_var_2], nrow) 
  
  </code></pre>
  <p>However, I am not aware on how to generate such column in a way I can define a name other than x1. The solution I have found so far is:</p>
  <pre><code>@pipe df |&gt; by(_, [:grouping_var_1, :grouping_var_2], nrow) |&gt; rename(_, :x1 =&gt; :my_desired_name);
  </code></pre>
  <p>Is there anyway I could do this directly without having to use rename ?</p>
  <p>Thanks in advance.</p>