The prohibition: It is forbidden to count Jews [in numbers such as 1, 2, 3 etc]. [This applies whether one is counting an individual group of Jews or is counting the Jewish people as a whole, such as for census taking. Rebbe Elazar says that anyone who counts the Jewish people transgresses a negative command [of the prophets]. Rav Nachman Bar Yitzchak says he transgresses two negative commands [of the prophets]. It is disputed as to whether this prohibition of counting the Jewish people is of Biblical or Rabbinical status.]
For non-census taking purposes: The above prohibition applies even if one intends to do so for [an external purpose, such as for] the sake of a raffle, in which a certain amount and number have been chosen [to win the prize, and he wants to count the people for the sake of knowing who will win the prize]. [It goes without saying that it is forbidden to count them for the sake of census taking.]
For the sake of a Mitzvah: It is forbidden to count Jews even for the sake of a Mitzvah [such as to count how many people are around for a Minyan].
How to count in a permitted way: [The above prohibition is only against counting people directly, however, one may count an external item, such as body parts or items that each person has. Thus, for example, if one wants to make a raffle] he may ask them to stick out their fingers and then count the fingers. [Likewise, to count for a Minyan one may count the number of shirts/hats in the room, and the like. However, some Poskim rule the allowance to count fingers, or any other item on the person, only applies for the sake of a Mitzvah. Practically, the custom of Jewry is to count Jews for a Minyan by reciting the verse of “Hoshia Es Amecha” as it contains exactly ten words. Alternatively, one can say the verse of “Ani Berov Chasdecha” to count for a Minyan, as this verse also contains ten words and is Segula against Ayin Hara. Alternatively, one can say the verse “Veani Sefilasi.” Alternatively, one can say the verse “Veshinantam Livanecha.” Counting through a Pasuk is also symbolic in giving the count a connection to the Torah and Moshe Rabbeinu, who was appointed as the first census taker of the Jewish people.]
It is forbidden to count Jews even for the sake of a Mitzvah, even if it is not for a census taking purpose. It is permitted to count an external item held by each person, such as a finger or shirt, and thus know the number of people in the group. Nonetheless, this form of counting should only be reserved for the sake of a Mitzvah. It is permitted to count for all purposes without using numerical values, as explained in the Q&A below. Practically, the custom is to count using a Pasuk in the Torah, customarily using the verse of Hoshia Es Amecha.
May one count Jews that are not in one’s presence?
Q&A on non-verbal forms of counting
May one count Jews in writing?
It is forbidden to count Jews even in writing.
May one count Jews in one’s thought?
Q&A on counting in an irregular fashion and without numerical values
What forms of counting are prohibited?
It is only forbidden to count in the regular form of numerical values, such as saying 1,2,3. However, if one avoids using the normal form of numerical values, then even though he ends up knowing the total number of people through the method he decided to count with, it is permitted to be done. The following as some examples of this:
May one count Jews by saying “not 1, not 2 etc?”
Yes. This is a valid alternative to counting the men for a Minyan, instead of saying the Pasuk, [as it is not the normal way of counting].
May one count downwards by saying 10, 9, 8, 7?
Seemingly it is permitted to do so as it is not the normal way of counting.
May one count 2, 4, 6, 8?
One may not do so if he is including an equal number of people in that count. However, if he counts each person as 2, and hence says for five people he counts 2, 4, 6, 8, 10 and divides it by 2 to know the correct number, then seemingly it is permitted to do so.
May one count Jews in letters, such as Alef, Beis?
One may not count Jews using the Hebrew Alef Beis, as it is considered a synonym for a number and contains a numerical value. [However, seemingly one may count using the English ABC’S as they are not considered a number at all.]
Q&A on counting Jews with non-Jews
May one count Jews and non-Jews together?
May one take part in the census taking of a country/state/county?
Some Poskim rule it is forbidden to take part in the census taking periodically done by governments even if both Jews and gentiles are being counted as part of the general population. Other Poskim, however, rule it is permitted to do so if one simply fills out a questionnaire.
 Admur 156:15; M”A 156:2; Peri Chadash 55:1; Rambam Temidin 4:4; Rebbe Yitzchak in Yuma 22b “It is forbidden to count the Jewish people even for a Mitzvah” based on Mishneh in Yuma 2:2 that the Kohanim would stick out their fingers for the raffle; Brachos 62b that even children know of this prohibition; Pesachim 54b; Sefer Haitim in name of Rav Haiy Gaon; Sefer Pardes of Rashi 99; Sefer Haorah of Rashi 1:56; Rashi Shmuel 1:15-1; Chesed Lealafim 55:10; Kaf Hachaim 55:11; Tzitz Eliezer 7:3 in length; Toras Menachem 5743 2:1138 [printed in Shulchan Menachem 1:203]; Piskeiy Teshuvos 156:24
 The source: This is deduced from the verse [Shmuel 1:15-4] “Vayishma Shaul Es Ham Vayifkideim Betelaim,” which describes that when Shaul counted the Jewish people, he counted them using sheep. [Yuma ibid] It is also learned from the fact Hashem had the Jewish people donate a half Shekel in order for Moshe to count them. [See Brachos 62b] Regarding the novelty of the ruling in Yuma from Shmuel versus that in Brachos from the Torah, some say that in Ki Sisa there is no explicit prohibition and thus the novelty in Yuma is that it is prohibited to do so. [Maharsha Yuma ibid] Alternatively, although the general prohibition is learned from Ki Sisa/Brachos, from Yuma ibid we learn that one may not count the Jewish people even for the sake of a Mitzvah. [Iyun Yaakov Yuma ibid; Pirush Hataz Al Hatorah; Hagahos Maharsham Yuma ibid] Alternatively, from Ki Sisa/Brachos we only learn of the prohibition to count the entire Jewish people, while from Yuma ibid we learn that one may not count even part of the Jewish people. [Chida in Eiyn Zocher Mareches Mem 24; Sefas Emes Yuma ibid] Alternatively, from Ki Sisa/Brachos we only learn of the prohibition to count the Jewish people for census purposes, while from Yuma ibid we learn that one may not count the Jewish people even for an external reason, such as for a raffle. [Chasam Sofer Chadashos 8] See Tzitz Eliezer 7:3 in length
The reason: Counting the Jewish people brings danger upon them, as all counted items are subject to Ayin Hara. [Rashi on Ki Sisa 30:12; See Bava Metzia 42a “Blessing is only found on that which is hidden from the eye”; Michaber O.C. 230:2] This was seen in the times of David, who Hashem punished to forget this law, and due to him counting the Jewish people he caused Avishai Ben Tzruya to be killed. [Brachos ibid; See Shmuel 2:24] The reason for this is because when one counts every individual separately, it arouses Divine scrutiny on each individual according to their standing, and could cause retribution for sins they may have. This is in contrast to including the entire Jewish people as a whole, in which they are scrutinized and judged as a community more than individually, and hence the sinner can find refuge in the community’s standing. This can be learned from the story with the Shunamis, who told Elisha the prophet that she does not want to be individually mentioned, and would rather be included amongst the rest of the nation. [Rabbeinu Bechayeh Ki Sisa ibid] Alternatively, counting each Jew individually separates one from his friend and forfeits the Divine blessing attributed to unity. [Panim Yafos Bamidbar 2:1]
 Chida in Eiyn Zocher ibid; Sefas Emes Yuma ibid; See Tzitz Eliezer ibid and previous footnote.
 This does not refer to one of the 365 negative commands that make part of the 613 Biblical Mitzvos, but rather to a Rabbinical command that is derived from the words of the Prophets, from where the verse that serves as the source of this negative command is found. [See Chida ibid; Tzitz Eliezer ibid Anaf 2]
 Yuma ibid; Omitted by Poskim ibid, Vetzaruch Iyun. See previous footnote regarding if the prohibition is of Biblical or Rabbinical status.
 Is the prohibition of Biblical or Rabbinical status? From the verses brought in Yuma ibid it is implied that the prohibition is due to Divrei Kabalah [Navi] and is hence of Rabbinical status. However, from the verse brought in Brachos ibid, it is implied that it is of Biblical status. Practically, some Poskim conclude that it is of Rabbinical status. [Chavos Yair 9; Rav Parlo on Rasag L.S. 264-265 based on the fact it is omitted from all Monei Hamitzvos; Sdei Tzufim on Yuma ibid based on response of Avraham the son of the Rambam] Others however conclude it is of Biblical status, although was not listed as one of the 613 for one reason or another. [Divrei Emes of Rav Yitzchak Becher of Kushta 1700, Lavim p. 86 that it is a Lav Miklal Asei learned from Ki Sisa; Shevet Halevi 9:35 in name of Chasam Sofer; See Tzitz Eliezer 7:3-1 and 2 in length]
 Admur ibid; M”A ibid; Yuma ibid; Sefer Hapardes of Rashi 99
 Admur ibid; M”A ibid; Rav Eliyahu Mizrachi on Rashi Ki Sisa; omitted in Kitzur SHU”A 15:3; See Pesachim 54b that the Kohen Gadol told Agripas the king to count the amount of Jewish people bringing the Karban through counting one kidney per animal.
For census taking: Some Poskim rule that when counting for purposes of census taking, one may not count fingers, or external items, even for the sake of a Mitzvah, and the only valid method is to use the Half Shekel as prescribed in the Torah. The allowance to count fingers is only for an external purpose, such as for a raffle and the like. [Likkutei Teshuvos Chasam Sofer 7] We do not rule like this opinion. [See Tzitz Eliezer ibid]
 Tosafus Rid Yuma ibid; Radak Shmuel 2:24; Daas Torah 156; Tzitz Eliezer ibid in length in name of many sources, including Ramban Al Hatorah; Shevet Halevi 6:20; 9:35; Piskeiy Teshuvos 156:24
 Tehillim 28 in end
 Kitzur SHU”A 15:3; Padah Es Avraham [Falgi] Mareches Mem 19; Rebbe in Toras Menachem ibid
The reason: The reason this verse became customary to be said despite the fact that the sources [in next footnote] bring a different more appropriate verse, is because this verse contains a request for the redemption, and hence now in the end of exile whenever ten Jews gather together and summon the Shechina with their presence we immediately beseech G-0d “Hoshia Es Amecha.” [Rebbe in Toras Menachem ibid]
 Tehillim 5:8
 Sefer Haitim in name of Rav Haiy Gaon; Sefer Pardes of Rashi 99; Sefer Haorah of Rashi 1:56; Rebbe in Toras Menachem ibid
The reason: This verse contains an advantage over the verse of Hoshia Es Amecha, being that it mentions the words “Avo Beisecha” which refers to a Shul
 Tehillim 69:14
 Pirush Kadmon brought in Otzer Hageonim Yuma p. 86
 Padah Es Avraham [Falgi] Mareches Mem 19
 Rebbe in Toras Menachem ibid
 See Tzitz Eliezer ibid Anaf 8
 Peas Hashulchan in his letter to the Chasam Sofer, printed in content in Tzitz Eliezer ibid
 Chasam Sofer in his response to the Peas Hashulchan, printed in content in Tzitz Eliezer ibid
 Kesav Sofer Y.D. 106 in name of his father; Shevet Halevi 6:20
 Eitz Yosef in Iyun Yaakov Yuma ibid
 Chesed Lealafim 55:10; Pela Yoeitz 2 Mem; Kaf Hachaim Falagi 13:14; Yifei Laleiv 55:3; Kaf Hachaim 55:11; Tzitz Eliezer ibid
 So is understood from the fact the Poskim all allow counting using a Pasuk, that if one does not use the regular numerical values it is not considered counting at all. Even when using numbers, when counting in an irregular way it is also permitted to be done, as evident from the Rebbe’s talk, brought in the next footnote.
 Rebbe in Toras Menachem ibid
 A similar precedent can be brought from the laws of Sefiras Hamoer, in which certainly if one said on the 5th day that “Today is not the 5th day of the Omer” he does not fulfill his obligation, being that the words verbalized do not express a count.
 Chesed Lealafim 55:10; Pela Yoeitz 2 Mem; Kaf Hachaim Falagi 13:14; Yifei Laleiv 55:3; Padah Es Avraham [Falgi] Mareches Mem 19; Kaf Hachaim 55:11; See Admur 489:7 regaridng if counting in letters is considered counting vis a vis Sefiras Haomer
 Shevet Halevi 9:35 that so ruled Gedolei Yisrael
 Tzitz Eliezer 7:3 Anaf 3 in length
 Shevet Halevi 6:20 unlike 9:35; Pesak Din of Eida Hachareidis in 1983 that it is forbidden to take any part in the census whether as a worker or answerer. Rav Chaim Kanievsky in Giluiy Daas in Hamodia 1983; See Teshuvos Vehanhagos 3:387; Karyana Diegrata letter 244; Piskeiy Teshuvos 156:24
 Shevet Halevi 9:35 unlike 6:20; Rav Shaul Yisraeli in Amud Hayemini 13; Seridei Eish 1:140; Techumin 4:327; See Tzitz Eliezer 7:3 in legnth
 The reason: As the census is being taken for the sake of a Mitzvah or a public need and when doing so for the sake of a Mitzvah one may take a census using an external item. Thus, being that the census takers do not count the people themselves, but rather an external item that they provide, such as a questionnaire, therefore it is permitted. [Poskim ibid] Alternatively, it is permitted being that also gentiles are included in the census. [Shevet Halevi ibid]