Final answer:
Miguel took 2 cookies in total.
Step-by-step explanation:
The number of cookies Miguel took can be found by adding the number of cookies he ate on the first and second selections. Since he randomly selects and eats one cookie, the number of cookies he took is 2.