Is there a difference between 一共 and 总共? Is there a difference between the use of these two? In my book, a sentence says '木屋里总共只有两个房间和一张床' - could you say 一共 here instead of 总共?
could you say 一共 here instead of 总共?

Edit:
Yes you can, '总共两个房间和一张床' means &quot;two rooms and one bed in total&quot; room and bed are grouped as features in the house, therefore '一共两个房间和一张床' (altogether) is also correct&quot;
However, it would be weird to say &quot;一共一张床&quot; because &quot;一共&quot; should apply to more than one item (which you add them up together)

总共 = in total
&quot;我们这里总共有十个房间&quot; = &quot;we have ten rooms here in total&quot;
&quot;我们总共十个人&quot; = &quot;we have ten people in total&quot;

~

一共 = altogether
&quot;我们这里一共有十个房间&quot; = &quot;we have ten rooms here altogether &quot;
&quot;我们一共十个人&quot; = &quot;we have ten people altogether &quot;

The only difference between 总共 and 一共 is 总共 can be used to describe a single item but 一共 cannot. We say &quot;总共只有一人&quot; , but not &quot;一共只有一人&quot;
Notice: you can say &quot;一共一元&quot; because a dollar is one hundred cents add up together.
&quot;一共一元&quot; means &quot;合共一元&quot; ($1 altogether)