一共 and 只: in total, only
副词 / adverbs (范围)
Tone colorsā tone 1á tone 2ǎ tone 3à tone 4a neutral
一共 + (Verb) + quantity / 只 + Verb (+ quantity)
一共 (yígòng) = "altogether, in total". It comes before the verb or directly before the amount: 一共多少钱?(How much altogether?) 我们一共五个人.
只 (zhǐ) = "only". It goes before the verb, never before the subject or directly before a noun: 我只要一碗面 (I'll just have a bowl of noodles).
For "only" + number, 只有 is common: 只有两个人.
Examples
一共一百二十八块。
Yígòng yìbǎi èrshíbā kuài.That's 128 yuan in total.
我们一共四个人。
Wǒmen yígòng sì ge rén.There are four of us altogether.
我只要一杯茶,谢谢。
Wǒ zhǐ yào yì bēi chá, xièxie.Just a cup of tea for me, thanks.
这家店只有周末开门。
Zhè jiā diàn zhǐ yǒu zhōumò kāimén.This shop only opens at weekends.
Common mistakes
✗ 只我要茶 → ✓ 我只要茶 (只 after the subject).
✗ 多少钱一共 → ✓ 一共多少钱.