Sample size calculation in COVID-19 study From A Randomized Trial of Hydroxychloroquine as Postexposure Prophylaxis for Covid-19 by Boulware et al. in the New England Journal of Medicine (https://www.nejm.org/doi/full/10.1056/NEJMoa2016638), I'm curious about the following sentence when it comes to appropriate sample size calculations:

Using Fisher’s exact method with a 50% relative effect size to reduce new symptomatic infections, a two-sided alpha of 0.05, and 90% power, we estimated that 621 persons would need to be enrolled in each group.

I'm interested in how this calculation is performed. I've never heard of "effect size" being used in the context of Fisher's exact test (I'm familiar with Coehn's $d$), and I'm not exactly sure how power calculations would work in this case (what's an appropriate alternative hypothesis?).
Keep in mind that I have zero expertise in clinical trials. I'm very comfortable with statistics at the level of Casella and Berger's text.
Textbooks and journal articles would be very helpful to have for further study.
 A: I know I am several months late, but just want to respond to the other answers.  All answers use simulations and/or claim the exact Fisher calculation is too computationally intensive.  If you code this efficiently, you can get an exact computation very quickly.  Below is a comparison time of the sample code fisherpower() function vs. the power.exact.test() function in the Exact R package:
    > system.time(power1 <- fisherpower(0.1,0.05,621))
       user  system elapsed 
     698.23    0.93  700.23 
    > system.time(power2 <- Exact::power.exact.test(n1=621, 
                   n2=621, p1=0.1, p2=0.05, 
                   method="Fisher")$power)
       user  system elapsed 
       0.32    0.00    0.33 
    
    > power1
    [1] 0.9076656
    > power2
    [1] 0.9076656

The calculation only takes 0.33s using power.exact.test() function compared with 700s using the fisherpower() function.  Note the power.exact.test() function computes the exact power without simulations, so there's no uncertainty and it's faster than simulating.  I also strongly recommend using Barnard's exact test over Fisher's exact test for comparing two proportions.  Below is the power calculation as the group sample size increases:
    nGroup <- 570:630
    powerFisher <- vapply(nGroup,
                          FUN = function(xn) {
                            Exact::power.exact.test(n1=xn, 
          n2=xn, p1=0.1, p2=0.05, method="Fisher")$power
                      }, numeric(1) )
powerBarnard <- vapply(nGroup,
                      FUN = function(xn) {
                        Exact::power.exact.test(n1=xn, 
      n2=xn, p1=0.1, p2=0.05, method="Z-pooled")$power
                          }, numeric(1) )
    
    plot(NA, xlim=range(nGroup), ylim = c(0.85,0.95), 
     xlab="Sample Size per Group", ylab = "Power")
    lines(nGroup, powerFisher, col='red', lwd=2)
    points(nGroup, powerFisher, pch = 21, col = 'red', bg = 
     "red", cex = 0.8)
    lines(nGroup, powerBarnard, col='blue', lwd=2)
    points(nGroup, powerBarnard, pch = 21, col = 'blue', bg = 
     "blue", cex = 0.8)
    
    abline(h=0.9, lty=2)
    abline(v=c(579, 606), col=c('blue', 'red'))
    legend(610, 0.875, c("Barnard", "Fisher"), col = c('blue', 
     'red'), lty = 1, pch=21, pt.bg=c('blue', 'red'), cex=1.2)


@heropup is correct that the group sample size should be 606 (not 621) as shown in the figure.  However, Barnard's test is more powerful and only requires 579 participants in each group using the "Z-pooled" test statistic.  Since this is a rare event, one may want to use the Berger and Boos (1994) interval approach, which brings the sample size down to 573 participants (code not shown, takes some time).  Importantly, these alternatives still control for the type 1 error rate and are simply superior to Fisher's exact test for 2x2 tables.  For analyzing the dataset, I would recommend using Exact::exact.test() which takes only 0.3s for the example dataset that @SextusEmpiricus provided instead of  Barnard::barnard.test() which takes 47s.  However, both yield the same results and I am the maintainer of the Exact R package so may be biased.
A: A glib answer is that they probably just plugged their numbers into a power calculator. I've attached a screenshot re-creating this power analysis in G*Power 3.1, a freely available power calculator. Note to match their result of 621 I had to go to "Options" and select "Maximize Alpha". 
The paper says "We anticipated that illness compatible with Covid-19 would develop in 10% of close contacts exposed to Covid-19" as well as "50% relative effect size". I interpret the second part to mean they assume that the effect of treatment will reduce the illness rate from 10% to 5%.
This leads to the values of $0.05$ and $0.1$ for Proportions p1 and p2 respectively.
Sadly I don't know how G*Power makes this calculation, but I can attempt to explain the idea at least. 
We are given our proportions of 0.1 and 0.05. For a given sample size $n$, we can randomly sample a 2x2 contingency table by sampling from two binomial random variables. The power calculation asks, "how often will Fischer's Exact Test reject the null hypothesis for a contingency table created using this process?".
In particular, we want to find the smallest $n$ such that Fischer's test will reject the null hypothesis at least 90% of the time.
One way to approximate this is with simulation. For a given $n$, sample say 10,000 contingency tables, run Fischer's test, and see how often the p-value is below 0.05. Keep increasing $n$ until the p-value is below 0.05 90% of the time or more...

A: You are missing a critical piece of information that the article cited immediately prior to your quote:

We anticipated that illness compatible with Covid-19 would develop in 10% of close contacts exposed to Covid-19.

This is the assumed incidence in the control group under the alternative hypothesis; i.e., $\pi_c = 0.1$.  The 50% relative effect size refers to a reduction in the incidence of Covid-19 infection in the treatment group, i.e. $\pi_t/\pi_c = 0.5$ from which it follows that $\pi_t = 0.05$, under the alternative hypothesis.
However, when I input these (along with $\alpha$ and $\beta$) into EAST 6, I don't get $n = 621$ per arm.  I get $n = 606$ per arm, and based on my simulations, I believe the latter value is correct.
