It is said that if you pray in Jama'at, Allah will accept your prayer so long as one person in the jama'at prayed a valid prayer. But if nobody among the jama'at prayed a valid prayer, does Allah still accept it?
It's not your decision that who's pray would be accepted, so just try on yourself to have a good praying with most attention. Always think about God from the way of mercy and kindness. Praying in jamaat is so emphasized from different aspects. So what will accept or not is not our duty, you just try to be good, God will hold his duties.
وعليكم السلام ورحمة الله وبركاته,
According to the Hanafis, there must be three people behind the Imam, and one of them must be a sane mature male. (According to Imam Abu Yusuf (rh)'s view, there must be two people, including one sane mature male)
According to the Malikis, the minimum number of followers is twelve local inhabitants of that particular locality excluding the Imam.
According to the Shafi'is and Hanbalis, there must be a minimum of forty followers upon whom Jumuah Salah is obligatory. Imam Ahmad R.A also has other views spanning from necessitating a minimum of 50 followers to only 3; however, a minimum of 40 seems to be the accepted view as stated in Al-Mughni of Ibn Qudama.