Superconformal indices and M2-branes