If probability of heads is known
If probability of heads is known, then you are not asking about confidence interval (check here and here for definition and further details), but about distribution quantiles. If you toss your coin $n$ times and observe $x \le n$ heads, then the tosses can be described by a binomial distribution parametrized by the number of tosses $n$ and probability of tossing head $p$. If you asked "what is the probability of observing $x$ or more heads in $n$ tosses?", you would be asking about cumulative distribution function
$$ \Pr(X \le x) = F_X(x) = q $$
quantile function answers the opposite question, i.e. "what is the value of $x$ such that $\Pr(X \le x) = q$ for a given value $q$?",
$$ F_X^{-1}(q) = x $$
more precisely, since cumulative distribution function of a discrete distribution is a step function, we need a generalized inverse distribution function for it
$$ F_X^{-1}(q) = \inf \{\, x \in \mathbb{R}: F_X(x) \geq q \,\} $$
Binomial distribution does not have a closed-form quantile function, but most statistical software offers you to calculate it numerically (e.g. qbinom
function in R). It can be also calculated "by-hand" for discrete distributions like binomial, since you can compute cumulative probabilities $q_i$ for each $x_i = 0,1,2,\dots,n $, and then simply choose such values of $q_i$ that correspond to the probabilities of interest.
If probability of heads is unknown
If, as stated later on in comments, we are dealing with hypothetical coin "whose properties are completely unknown", then this is a different problem. We would still assume binomial distribution for counts of heads $X$, but the "unknown properties" can be understood as assuming that probability of heads $p$ is a random variable. As noticed in the comments below by amoeba and Xi'an, this can be assumed as a Bayesian problem, in terms of beta-binomial model.
Since $p$ is random and can be anything, we assume for it a "uniform" prior, i.e. beta distribution with parameters $\alpha = \beta = 1$. If we toss the coin some number of times, then we can update our prior for the additional information. Since beta is a conjugate prior for binomial distribution, updating is very simple and updated parameters become $\alpha' = \alpha + \text{number of heads}$ and $\beta' = \beta + \text{number of tails}$ and the quantiles of interest can be calculated from posterior beta distribution parametrized by $\alpha'$ and $\beta'$.
The interval of interest can be easily obtained using theoretical quantiles. Two different kinds of intervals may be obtained in this scenario:
interval for number of heads $x$, that can be calculated from posterior predictive distribution that in this case is a beta-binomial distribution, or
interval for possible values of $p$ that can be calculated from beta distribution.
As noted above, the interval can be calculated before seeing any data from prior distribution parametrized by $\alpha = \beta = 1$, or after seeing some data and updating for it, from posterior distribution parametrized by $\alpha'$ and $\beta'$. Each time you observe new data you can update your posterior for it to make your estimate more and more precise.