add row count devepxress report

C#
 int counter = 0;
        private void lblCount_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            counter++;
            lblCount.Text = counter.ToString();
        }
Source

Also in C#: